package string

import (
	"fmt"
	"math"
	"math/rand/v2"
	"strconv"
)

var GenerateVerifyCode6 = makeVerifyCode(6)

func makeVerifyCode(n int) func() string {
	return func() string {
		return fmt.Sprintf("%0"+strconv.Itoa(n)+"d", rand.IntN(int(math.Pow10(n))))
	}
}
